package com.iss.ljx.role.repository;

import com.iss.ljx.mybatis.entity.PtRoleEntity;
import com.iss.ljx.mybatis.flexigrid.PagingBean;
import com.iss.ljx.mybatis.ztree.ZtreeEntity;
import com.iss.ljx.role.entity.SearchRoleEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface RoleDao {
    List<PtRoleEntity> queryRoleListPage(@Param("search") SearchRoleEntity search, @Param("paging") PagingBean paging);

    Integer queryRoleTotal(@Param("search")SearchRoleEntity search);
    List<ZtreeEntity> queryMenuTree();

    List<String> queryMenuIdByRoleId(@Param("roleUuid")String roleUuid);

    void deleteMenuByRoleId(@Param("roleUuid")String roleUuid);

    void insertMenuAndRole(@Param("roleUuid")String roleUuid,@Param("menuId") String menuId);

    void roleAdd(@Param("ptRoleEntity") PtRoleEntity ptRoleEntity);

    void roleUpdate(@Param("ptRoleEntity") PtRoleEntity ptRoleEntity);

    void roleDelete(@Param("ptRoleEntity") PtRoleEntity ptRoleEntity);

    void deleteUserByRoleId(@Param("roleUuid")String roleUuid);
    void insertUserAndRole(@Param("userUuid") String userUuid,@Param("roleArray")String roleUuid);
}
